package main

import "fmt"


func copyTest(){
	s1 := []int{1,2,3}
	s2 := make([]int, 5)
	s3 := make([]int, 2)

	num := copy(s2, s1)
	num2 := copy(s3,s1)

	fmt.Println(s2, num)
	fmt.Println(s3, num2)
}


func main() {
	var nil_s []int
	empty_s := []int{214}
	println(nil_s)
	println(empty_s)
	fmt.Println(empty_s)

	//slice[A:] 从A切到最尾部
	//slice[:B] 从最开头切到B不包含B
	//slice[:] 复制全部
	copyTest()
}
